/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.eps.modelo.javabeans;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author luis
 */
@Embeddable
public class PadronLecturaPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "T_CicloMedicion_ID")
    private int tCicloMedicionID;
    @Basic(optional = false)
    @Column(name = "correlativo")
    private short correlativo;

    public PadronLecturaPK() {
    }

    public PadronLecturaPK(int tCicloMedicionID, short correlativo) {
        this.tCicloMedicionID = tCicloMedicionID;
        this.correlativo = correlativo;
    }

    public int getTCicloMedicionID() {
        return tCicloMedicionID;
    }

    public void setTCicloMedicionID(int tCicloMedicionID) {
        this.tCicloMedicionID = tCicloMedicionID;
    }

    public short getCorrelativo() {
        return correlativo;
    }

    public void setCorrelativo(short correlativo) {
        this.correlativo = correlativo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) tCicloMedicionID;
        hash += (int) correlativo;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PadronLecturaPK)) {
            return false;
        }
        PadronLecturaPK other = (PadronLecturaPK) object;
        if (this.tCicloMedicionID != other.tCicloMedicionID) {
            return false;
        }
        if (this.correlativo != other.correlativo) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "murguia.ejb30.entity.COMER.PadronLecturaPK[tCicloMedicionID=" + tCicloMedicionID + ", correlativo=" + correlativo + "]";
    }

}
